spb/datacenterindex
Public
HTML 53.9%
TypeScript 44.5%
JavaScript 0.6%
SQL 0.5%
1import { notFound } from "next/navigation";2import type { ReactNode } from "react";3import { api } from "@/lib/api";45/** Existence check outside the loading boundary so unknown keys return a real 404 (the fetch is cached for the page). */6export default async function RankingLayout({ children, params }: { children: ReactNode; params: Promise<{ key: string }> }) {7 const { key } = await params;8 const r = await api.ranking(key, { limit: 200 });9 if (!r.ok && (r.status === 404 || r.status === 400)) notFound();10 return children;11}12